<?php
/**
 *
 * @package
 * @version 1.0.0 
 * @author Olivier ROGER <roger.olivier@gmail.com>
 * @copyright  2007-2009 Prynel
 *       
 *
 */
class Twig_Extension_Filters_BBcode extends Twig_Extension
{
	public function getFilters()
	{
		return array('bbcode'=>
						array('twig_bbcode_string',true));
	}
	
	public function getName()
	{
		return 'bbcode';
	}
}

function twig_bbcode_string(Twig_Environment $env,$string)
{
	$bbcode = new Pry_BBcode2Html();
	return $bbcode->transform($string);
}
?>